home *** CD-ROM | disk | FTP | other *** search
- Path: francenet.fr!usenet
- From: madbrain@micronet.fr (Julien Pierre)
- Newsgroups: comp.lang.c++,comp.os.os2.programmer.oop
- Subject: Nested classes
- Date: Sat, 17 Feb 1996 03:03:17 -0500
- Organization: Francenet -- Paris, France
- Message-ID: <FvYJxQxFKpkc084yn@micronet.fr>
- NNTP-Posting-Host: ppp79.micronet.fr
- Mime-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
-
- I am trying to compile the following code :
-
- class DMPWindow
- {
- friend class Parameters;
- private:
- class Parameters
- {
- private:
- class Handler
- {
- public:
- Handler(DMPWindow :: Parameters& winhandle);
- };
- };
- };
-
- I get the following error with IBM C Set ++ :
-
- 11 | Handler(DMPWindow :: Parameters& winhandle);
- NESTED.CPP(11:1) : error EDC3016: private member "DMPWindow::Parameters" cannot
- be accessed.
-
- When I compile with Watcom there is no error.
- If I make the DMPWindow :: Parameters class public, all is well even with IBM C Set ++,
- but I want it to remain private.
- What am I doing wrong ? I've made DMPWindow a friend of Parameters, so it
- shouldn't happen. What should I do ? Is this an IBM bug ?
-
- //----------------------------------------------------------------------------
- // Julien R. Pierre
- // Certified OS/2 Engineer
- // OS/2 Multimedia Developer - using IBM C Set ++
- // http://www.polsci.wvu.edu/Henry/Madbrain - Phone +33-1-30471798.
-